#example7_15.py
#coding=utf-8
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt

np.random.seed(1)
df = pd.DataFrame(np.random.rand(30, 2), columns=['a', 'b'])

#方式1：df.plot.scatter()
ax1 = df.plot.scatter(x='a', y='b',marker='*',
            color='Blue', label='BlueScatter')

#方式2：df.plot(kind='scatter')
df.plot(kind='scatter',x='b', y='a', color='Green',
            label='GreenScatter', ax=ax1) 
#参数中ax=ax1，表示与上一个图使用同一个坐标系

plt.show()
